<?php
    $this->headTitle($this->site_name.' - Dashboard');
?>
<script>
	$(function() {
		$( "#dialog-form" ).dialog({
			autoOpen: true,
			height: 310,
			width: 420,
			modal: true
		})

		$( "#dpt_id" ).change(function () {
			if ( $("#dpt_id option:selected").val()==1 ){
				location="/index/google";
			}
		})

	});
		
</script>

		<?php if ( !empty($this->msg) and ($this->msg=='signup') ):?>
		<div class="response-msg success ui-corner-all"><b>Signup successfully! Please login with your account email and password.</b></div>			
		<?php endif ?>

        <?php if (!empty($this->formError)): ?>
            <div class="response-msg error ui-corner-all" style="font-weight:bold;">
                <?php echo $this->formError; ?>
            </div>
        <?php endif; ?>


        <div id="dialog-form" title="Login to client account" style="display:none;font-size:11px;" >

			<?php if (empty($this->msg)):?>
				<div style="margin-bottom:20px;">Use your YesUp central account to log in.  <a href="/signup" style="font-size:10px;float:right;">Create Account</a></div>
			<?php else: ?>
            	<?php echo $this->msg; ?>			
			<?php endif; ?>
			
	        <?php if (!empty($this->formError)): ?>
	            <div style="color:red;font-weight:bold;">
	                <?php echo $this->formError; ?>
	            </div>
	        <?php endif; ?>
			
            <?php echo $this->form; ?>
            
			<div style="margin: -32px 10px 0 260px;"><a href="/login/forget-password">Forget password?</a></div>

        </div>

<div id="dashboard">

<h2>Home</h2>
 
<div class="section">
<h3>Welcome to YesUp central account system.</h3>

<div class="demo-frame1" id="droppable1">		

	<ul id="sortable1">
	<li><p>What you can do from YesUp central account?</p></li>
	<li><p>-  Access all of your services in one account.</p></li>
	<li><p>-  Transfer funds between your subscribed services.</p></li>
	<li><p>-  Check all important messages at one place.</p></li>
	<li><p><a href="/client/" class="grey-btn"><b class="ui-title">Go to my account</b></a></p></li>
	</ul>

</div>
 
</div>


<div class="section">
<div style="margin-left:50px;">
<h3>All YesUp services:</h3>

<div class="demo-frame1" id="droppable2">		

	<ul>
	<?php 
	foreach($this->all_services as $index => $item ){
		echo '<li id="'.$item['icon'].'" class="draggable2" style="cursor:pointer;"><div id="'.$item['icon'].'_div"  onclick="window.open(\''.$item['service_url'].'\');"><a href="#">'.$item['dpt_name'].'</a>-<b>'.$item['title'].'</b><span id="'.$item['icon'].'_span"></span><p>'.$item['description'].'.</p></div></li>';
	}
	?>
	</ul>

</div>
 </div>
 
</div>


</div>

